package com.burt.factory.simple;

import com.burt.factory.AdSms;
import com.burt.factory.NotifySms;
import com.burt.factory.ISms;
import com.burt.factory.VerificationSms;

/**
 * Description: 简单工厂
 * User: Burt
 * Date: 2017-05-23
 * Time: 21:15
 */
public class SimpleFactory {

    public ISms getSms(int type){
        switch (type){
            case 1:
                return new VerificationSms();
            case 2:
                return new NotifySms();
            case 3:
                return new AdSms();
            default:
                    return null;
        }
    }
}
